<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="stylesheet" type="text/css" href="css/user_iconfont.css">
    <link rel="stylesheet" type="text/css" href="css/amazeui.min.css">
    <link rel="stylesheet" type="text/css" href="css/appuser.css">
    <link rel="stylesheet" type="text/css" href="../layer/css/layer.css"/>
    <script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/amazeui.min.js"></script>
    <script type="text/javascript" src="../layer/layer.js"></script>
    
    
<style>
    html,body{background:url(img/login_bg.png) no-repeat;background-size: cover;}
</style>

    
</head>
<body>

<div class="am-text-center logo"><a href="/"><img src="http://sl518.com/images/sl/logo_hei.png" /></a></div>
<div class="am-text-right am-margin-horizontal am-text-sm tips_login">还没有？<a href="register.html">立即注册</a></div>
<div class="am-padding-horizontal m_form">
    <form class="form" action="/index.html">
        <ul class="am-list am-list-static member_data">
            <li>
                <b class="iconfont icon-iconfont am-margin-right"></b>
                <input class="text" type="text" name="phone" placeholder="输入昵称/手机号码" datatype="n11-11" nullmsg="请输入昵称/手机号码！" />
            </li>
            <li>
                <b class="iconfont icon-mima am-margin-right"></b>
                <input class="text" type="password" name="password" placeholder="输入密码" datatype="*4-25" nullmsg="密码范围在4~25位之间！" />
            </li>
            <li>
                <b class="iconfont icon-mima1 am-margin-right"></b>
                <input class="text" type="text" style="width: 36%" name="varcode" placeholder="请输入验证码" datatype="*4-4" nullmsg="请输入验证码！" errormsg="验证码格式错误！">
                <img src="http://sso.sl518.com/captcha/login.html" id="codeimg" onclick="$(this).attr('src','http://sso.sl518.com/captcha/login.html?x='+Math.random())" style="width: 130px;height: 38px;;float: right;margin-top: -6px;">
            </li>
        </ul>
        <p class="am-text-sm am-text-right"><a class="colorfff" href="/index/reset.html">忘记密码？</a></p>
        <button type="submit" id="loginbtn" class="am-btn-success" style="width: 100%;">立即登录</button>
    </form>
</div>

</body>


<script type="text/javascript" src="../js/validform/Validform_v5.3.2_min.js"></script>
<script type="text/javascript">
    var index;
    $(function () {
        var form=$(".form").Validform({
            btnSubmit:"#loginbtn",
            ajaxPost:true,
            postonce: true,
            tiptype:function(msg,o,cssctl){
                if (!o.obj.is("form")) {
                    if (o.type == 3) {
                        layer.msg(msg, {shift: 6});
                    };
                    if (o.type == 4) {
                        layer.msg(msg, {shift: 6});
                    };
                }
            },
            beforeSubmit:function(curform){
                index = layer.load(0, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });
            },
            callback:function(data){
                if(data.error===0){
                    layer.msg("登录成功！");
                    location.href="/index/sync?redirect="+data.url+"&code="+data.code;
                }else {
                    layer.close(index);
                    form.resetStatus();
                    $("#codeimg").attr('src','/captcha/login.html?x='+Math.random());
                    layer.msg(data.msg);
                }
            }
        });
    });


</script>


</html>